package cn.assumejson.pro_netty.example.controller;

import cn.assumejson.pro_netty.annotation.RemoteInvoke;
import cn.assumejson.pro_netty.example.service.UserService;
import org.springframework.stereotype.Component;

/**
 * 试下你自定义 注解 使用netty 进行远程调用
 *
 * @author by gang.Li 2022/3/12 17:09
 */
@Component
public class LoginController {

    @RemoteInvoke
    private UserService userService;

    public Object getUserByName(String userName) {
        return userService.getUserNameById(userName);
    }
}
